<?php
/**
 * Created by PhpStorm.
 * User: User
 * Date: 2017/9/29
 * Time: 8:16
 */

class person
{
public $name;
public $age;
public $sex;


public function __construct($name,$age,$sex){
    $this->name=$name;
    $this->age=$age;
    $this->sex=$sex;
}

    public  function say(){
    echo'我的名字是'.$this->name
        .',我的性别是'.$this->sex
        .',我的年龄是'.$this->age;
}
}
$my=new person('洪道森',18,'男');
$my->say();